/* eslint-disable no-extend-native */
Date.prototype.format = function (str) { //"YYYY-MM-DD hh:mm:ss"
    let year = this.getFullYear();
    let month = this.getMonth() + 1;
    let day = this.getDate();
    return str.replace("YYYY", year).replace("MM", month).replace("DD", day);
}